#include "sqstack.h"
#include <string.h>
#include "tree.h"

int main(void)
{
	char *VLR = "ABCDEFGH";
	char *LVR = "CBEDFAGH";
	char *LRV = "CEFDBHGA";
	BinaryTree tree;

	Init(&tree, '#');
	int n = strlen(VLR);
	//Create_VLR_LVR(&tree.root, VLR, LVR, n);   //依据前序和中序建立二叉树
	Create_LVR_LRV(&tree.root, LVR, LRV, n); //依据中序和后序建立二叉树
	printf("先序遍历结果为：");
	PreOrder(&tree);
	printf("中序遍历结果为：");
	InOrder(&tree);
}